package com.haixiaoke.saas.contract.service;


import com.haixiaoke.saas.common.core.domain.AjaxResult;
import com.haixiaoke.saas.contract.domain.ProprietorContract;
import com.haixiaoke.saas.user.domain.UserConsumer;

import java.util.List;

/**
 * 业主合同管理Service接口
 *
 * @author xiaolong
 * @date 2024-05-27
 */
public interface IProprietorContractService {
    /**
     * 查询业主合同管理
     *
     * @param proprietorContractId 业主合同管理主键
     * @return 业主合同管理
     */
    ProprietorContract selectProprietorContractByProprietorContractId(String proprietorContractId);

    /**
     * 查询业主合同管理列表
     *
     * @param proprietorContract 业主合同管理
     * @return 业主合同管理集合
     */
    List<ProprietorContract> selectProprietorContractList(ProprietorContract proprietorContract);

    /**
     * 新增业主合同管理
     *
     * @param proprietorContract 业主合同管理
     * @return 结果
     */
    int insertProprietorContract(ProprietorContract proprietorContract);

    /**
     * 修改业主合同管理
     *
     * @param proprietorContract 业主合同管理
     * @return 结果
     */
    int updateProprietorContract(ProprietorContract proprietorContract);

    /**
     * 批量删除业主合同管理
     *
     * @param proprietorContractIds 需要删除的业主合同管理主键集合
     * @return 结果
     */
    int deleteProprietorContractByProprietorContractIds(String[] proprietorContractIds);

    /**
     * 删除业主合同管理信息
     *
     * @param proprietorContractId 业主合同管理主键
     * @return 结果
     */
    int deleteProprietorContractByProprietorContractId(String proprietorContractId);

    List<UserConsumer> selectProprietorInfo();

    List<ProprietorContract> selectProprietorContractByProprietorUserId(ProprietorContract proprietorContract);

    int updateProprietorContractByProprietorContractId(String proprietorContractId);

    String selectProprietorContractElectronicVisaPreviewUrl(ProprietorContract proprietorContract);

    /**
     * 业主合同上传合同图片
     * @param proprietorContract
     * @return
     */
    AjaxResult uploadContractImage(ProprietorContract proprietorContract);

    /**
     * 撤销合同
     * @param contract
     * @return
     */
    AjaxResult repealProprietorContract(ProprietorContract contract);

    /**
     * 签订合同
     * @param proprietorContract    业主合同
     * @param conUserId             乙方id
     * @return
     */
    AjaxResult signingLesseeContract(ProprietorContract proprietorContract, Long conUserId);

    /**
     * 每天凌晨10分执行业主合同逾期定时任务
     */
    void proprietorContractOverdueTask();

    /**
     * 根据流程id查询租客合同
     * @param flowId
     * @return
     */
    ProprietorContract selectProprietorContractByFlowId(String flowId);
}
